import request from '@/utils/request'

const api_name = `/api/order/orderInfo`

export default {
  //根据排班id和就诊人id提交生成订单
  submitOrder(scheduleId, patientId) {
    return request({
      url: `${api_name}/auth/submitOrder/${scheduleId}/${patientId}`,
      method: 'post'
    })
  },
  //订单列表（查询带分页）
  getList(page, limit, searchObj) {
    return request({
      url: `${api_name}/auth/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },
  //获取订单详情
  getOrders(orderId) {
    return request({
      url: `${api_name}/auth/getOrder/${orderId}`,
      method: `get`
    })
  },
  //获取订单状态列表
  getStatusList(){
    return request({
      url:`${api_name}/auth/getStatusList`,
      method:'get'
    })
  }
}